<div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">

    <div class="row ">
        <div class="col-sm-2">
            <input type="text" class="form-control"  ng-model="id" placeholder="产品编号"> 
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="product_name" placeholder="产品名称">
        </div>
        <div class="col-sm-2">
            <ui-select ng-model="d.product_type" theme="bootstrap" >
                <ui-select-match placeholder="请选择产品类型">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in ptarr | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="supplier_product_name" placeholder="供应商产品名称"> 
        </div>
        <div class="col-sm-2">
            <ui-select ng-model="d.product_state" theme="bootstrap" >
                <ui-select-match placeholder="请选择产品状态">
                    {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item.value as item in psarr | filter: $select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="start_city_arr" placeholder="出发城市"> 
        </div>
    </div>

    <div class="row mt10">     
        <div class="col-sm-2 col-sm-offset-2 pull-right">
            <button class="btn btn-block btn-info" ng-click="search()">搜索</button> 
        </div>

    </div>

</div>
</div>
</div>
<!-- searchArea -->

<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered" style="display: table; width: 100%;table-layout:fixed;">
            <thead>
                <tr>
                    <th class=" text-center"style="width: 15%;text-align:center;vertical-align:middle;">产品编号</th>
                    <th class=" text-center"style="width: 15%;text-align:center;vertical-align:middle;">主名称/副名称</th>
                    <th class=" text-center"style="width: 13%;text-align:center;vertical-align:middle;">供应商产品名称</th>
                    <th class=" text-center"style="width: 9%;text-align:center;vertical-align:middle;padding:0px">产品类型</th>
                    <th class=" text-center"style="width: 10%;text-align:center;vertical-align:middle;">修改时间</th>
                    <th class=" text-center"style="width: 14%;text-align:center;vertical-align:middle;">出发/目的城市</th>
                    <th class=" text-center"style="width: 9%;text-align:center;vertical-align:middle;padding:0px">产品状态</th>
                    <th class=" text-center"style="width: 8%;text-align:center;vertical-align:middle;padding:0px">驳回原因</th>
                    <th class=" text-center"style="width: 7%;text-align:center;vertical-align:middle;">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="info in a">
                    <td class="text-center"style="width: 15%;text-align:center;vertical-align:middle;">{{info.id}}</td>
                    <td class="text-center"style="width: 16%;text-align:center;vertical-align:middle;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.product_name}}">{{info.product_name}}</div><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.product_sub_name}}">{{info.product_sub_name}}</div></td>
                    <td class="text-center"style="width: 10%;text-align:center;vertical-align:middle;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.supplier_product_name}}">{{info.supplier_product_name}}</div></td>
                    <td class="text-center"style="width: 10%;text-align:center;vertical-align:middle;">{{info.product_type_name}}</td>
                    <td class="text-center"style="width: 7%;text-align:center;vertical-align:middle;padding:0px">{{info.update_time}}</td>
                    <td class="text-center"style="width: 7%;text-align:center;vertical-align:middle;"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.start_city_arr}}">{{info.start_city_arr}}</div><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{info.end_city}}">{{info.end_city}}</div></td>
                    <td class="text-center"style="width: 7%;text-align:center;vertical-align:middle;">{{info.product_state_name=="待上架"?"正在审核":info.product_state_name}}</td>      
                    <td class="text-center"style="width: 7%;text-align:center;vertical-align:middle;">{{info.back_setup_reason}}</td>
                    <td class="text-center" style="width: 10%;text-align:center;vertical-align:middle;" ng-if="info.product_state_name=='草稿'||info.product_state_name=='已驳回'">
 
                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" >
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="goup($index)" >申请上架</a>
                                    </li>
                                    <li>
                                        <a ng-click="edit($index)" >编辑</a>
                                    </li>
                                    <li>
                                        <a ng-click="toinfo($index)" >详情</a>
                                    </li>
                                    <!--<li>
                                        <a ng-click="setgroupstate($index)" >设置团期</a>
                                    </li>-->
                                    <li>
                                        <a ng-click="delegate($index)" >删除</a>
                                    </li>
                                    
                                </ul>
                        </div>


                        </td>
                    <!--待上架状态-->
                    <td  style="width: 10%;text-align:center;vertical-align:middle;" ng-if="info.product_state_name=='待上架'">                       

                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" >
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >                                   
                                    <li>
                                        <a ng-click="toinfo($index)" >详情</a>
                                    </li>                                   
                                </ul>
                        </div>

                     </td>
                      <!--已上架状态-->
                    <td  style="width: 10%;text-align:center;vertical-align:middle;" ng-if="info.product_state_name=='已上架'">
                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" >
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="godown($index)" >下架</a>
                                    </li>                                   
                                    <li>
                                        <a ng-click="toinfo($index)" >详情</a>
                                    </li>
                                    <li>
                                        <a ng-click="setgroupstate($index)" >设置团期</a>
                                    </li>
                                    <li>
                                        <a ng-click="skset($index)" >商客专属设置</a>
                                    </li>
                                </ul>
                        </div> 

                     </td>
                     <!--已下架状态-->
                    <td  style="width: 10%;text-align:center;vertical-align:middle;" ng-if="info.product_state_name=='已下架'">
                        <div class="btn-group" dropdown="">
                                <button type="button" class="btn btn-primary btn-xs" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false" >
                                    操作 <span class="caret"></span>  
                                </button>
                                <ul class="dropdown-menu" role="menu" >
                                    <li>
                                        <a ng-click="copy($index)" >复制</a>
                                    </li>                                   
                                    <li>
                                        <a ng-click="toinfo($index)" >详情</a>
                                    </li>
                                    <li>
                                        <a ng-click="delegate($index)" >删除</a>
                                    </li>
                                    
                                </ul>
                        </div>
                     </td>
                    
                    
                </tr>
            </tbody>
        </table>
        <div class="text-right">
             <pagination 
                total-items="totalItems" 
                ng-model="currentPage" 
                ng-change="pageChanged()"
                previous-text="上一页"
                next-text="下一页"
                first-text="首页"
                last-text="尾页"
                max-size="5"
                boundary-links="true"
                rotate="false"
                items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
    </div>
</div>

</div>